<div id="form_leave">
	<div class="pc-nav form-nav">
		<button @click="back(-1)"><i class="icon iconfont">&#xe62b;</i></button>
		<span>商旅出差</span>
	</div>
	<ul class="approval-form-wrap" style="padding-bottom: 0;">
		<li>
			<em class="left"><span style="color: red;">*</span>出差事由</em>
			<i class="right">
				<input v-model="submitJson.component[0].value" type="text" placeholder="请输入出差事由" />
			</i>
		</li>
		<li v-if="subFlag && /^\s*$/g.test(submitJson.component[0].value)">
				<em class="left"></em>
				<i class="right">
					<p style="color: red;" data-false='true'>请输入出差事由不能为空</p>
				</i>
		</li>
	</ul>
	<form-repeat class="approval-form-repeat approval-form-wrap" v-on:getrepeat="repeatFn" init='[{"name":"交通工具","value":""},{"name":"单程往返","value":""},{"name":"出发城市","value":""},{"name":"目的城市","value":""},{"name":"开始时间","value":""},{"name":"结束时间","value":""},{"name":"考勤时长（天）","value":""}]' >
		 <template slot-scope="props">
			<li>
				<em class="left"><span style="color: red;">*</span>交通工具</em>
				<i class="right">
					<select class="" v-model="props.o[0].value">
						<option  value="" >请选择（必填）</option>
						<option value="飞机" >飞机</option>
						<option  value="火车" >火车</option>
						<option value="汽车" >汽车</option>
						<option value="其他" >其他</option>
					</select>
				</i>
			</li>
			<li v-if="subFlag && /^\s*$/g.test(props.o[0].value)">
				<em class="left"></em>
				<i class="right">
					<p style="color: red;" data-false='true'>交通工具不能为空</p>
				</i>
			</li>
			<li>
				<em class="left"><span style="color: red;">*</span>单程往返</em>
				<i class="right">
					<select class="" v-model="props.o[1].value">
						<option selected="" value="" >请选择（必填）</option>
						<option value="单程" >单程</option>
						<option selected="" value="往返" >往返</option>
					</select>
				</i>
			</li>
			<li v-if="subFlag && /^\s*$/g.test(props.o[1].value)">
				<em class="left"></em>
				<i class="right">
					<p style="color: red;" data-false='true'>单程往返不能为空</p>
				</i>
			</li>
			<li>
				<em class="left"><span style="color: red;">*</span>出发城市</em>
				<i class="right">
					<select class="" v-model="props.o[2].value">
						<option selected="" value="" >请选择（必填）</option>
						<option value="单程" >单程</option>
						<option selected="" value="往返" >往返</option>
					</select>
				</i>
			</li>
			<li v-if="subFlag && /^\s*$/g.test(props.o[2].value)">
				<em class="left"></em>
				<i class="right">
					<p style="color: red;" data-false='true'>出发城市不能为空</p>
				</i>
			</li>
			<li>
				<em class="left"><span style="color: red;">*</span>目的城市</em>
				<i class="right">
					<select class="" v-model="props.o[3].value">
						<option selected="" value="" >请选择（必填）</option>
						<option value="单程" >单程</option>
						<option selected="" value="往返" >往返</option>
					</select>
				</i>
			</li>
			<li v-if="subFlag && /^\s*$/g.test(props.o[3].value)">
				<em class="left"></em>
				<i class="right">
					<p style="color: red;" data-false='true'>目的城市不能为空</p>
				</i>
			</li>
			<li>
				<em class="left"><span style="color: red;">*</span>开始时间</em>
				<i class="icon right">
					<span class="datepicker">
						<vue-datepicker-local v-model="props.o[4].value" ></vue-datepicker-local>
					</span>
				</i>
			</li>
			<li>
				<em class="left"><span style="color: red;">*</span>结束时间</em>
				<i class="icon right">
					<span class="datepicker">
						<vue-datepicker-local v-model="props.o[5].value"></vue-datepicker-local>
					</span>
				</i>
			</li>
			<li v-if="subFlag &&(/^\s*$/g.test(props.o[4].value)||/^\s*$/g.test(props.o[5].value) )">
				<em class="left"></em>
				<i class="right">
					<p style="color: red;" data-false='true'>开始时间或结束时间不能为空</p>
				</i>
			</li>
			<li>
				<em class="left"><span style="color: red;">*</span>考勤时长（天）</em>
				<i class="right">
					<input type="number" v-model="props.o[6].value" />
				</i>
			</li>
			<li v-if="subFlag && /^\s*$/g.test(props.o[6].value)">
				<em class="left"></em>
				<i class="right">
					<p style="color: red;" data-false='true'>考勤时长不能为空</p>
				</i>
			</li>
		</template>
	</form-repeat>
	<ul class="approval-form-wrap">
		<li>
			<em class="left"><span style="color: red;">*</span>出差天数</em>
			<i class="right">
				<input v-model="submitJson.component[1].value" type="text" placeholder="请输入出差天数" />
			</i>
		</li>
		<li v-if="subFlag &&/^\s*$/g.test(submitJson.component[1].value)">
			<em class="left"></em>
			<i class="right">
				<p style="color: red;">出差天数不能为空</p>
			</i>
		</li>
		<li>
			<em class="left">出差备注</em>
			<i class="right">
				<textarea name="" rows="" v-model="submitJson.component[2].value" cols="" placeholder="请输入具体的出差备注(选填，少于500字)"></textarea>
			</i>
		</li>
		<li>
			<em class="left"><span style="color: red;">*</span>成本中心</em>
			<i class="right">
				<select class="" v-model="submitJson.component[3].value">
					<option  value="" >请选择（必填）</option>
					<option  value="北京新七天电子商务技术股份有限公司">北京新七天电子商务技术股份有限公司</option>
				</select>
			</i>
		</li>
	    <li v-if="subFlag &&/^\s*$/g.test(submitJson.component[3].value)">
			<em class="left"></em>
			<i class="right">
				<p style="color: red;">成本中心不能为空</p>
			</i>
		</li>
		<li>
			<em class="left"><span style="color: red;">*</span>发票抬头</em>
			<i class="right">
				<select class="" v-model="submitJson.component[4].value">
					<option  value="" >请选择（必填）</option>
					<option  value="北京新七天电子商务技术股份有限公司">北京新七天电子商务技术股份有限公司</option>
				</select>
			</i>
		</li>
	    <li v-if="subFlag &&/^\s*$/g.test(submitJson.component[4].value)">
			<em class="left"></em>
			<i class="right">
				<p style="color: red;">发票抬头不能为空</p>
			</i>
		</li>  
		<li>
			<em class="left">同行人</em>
			<i class="right">
				<dingdinguser-input v-on:getdingdinguser="getHandover" max="200"></dingdinguser-input>
			</i>
		</li>
	    <li v-if="subFlag &&/^\s*$/g.test(submitJson.component[4].value)">
			<em class="left"></em>
			<i class="right">
				<p style="color: red;">发票抬头不能为空</p>
			</i>
		</li>
		<li>
			<em class="left">图片</em>
			<i class="right">
				<upload_tpl message="img" name="图片" v-on:getfile="getFilefn"></upload_tpl>
			</i>
		</li>
		<li>
			<em class="left">审批人</em>
			<i class="right">
				<dingding_users  v-on:getdingdinguser="getApproveUsers" message="approve" :approve_list="approve_list" :cc_list="cc_list" ></dingding_users>
			</i>
		</li>
		<li>
			<em class="left">抄送人</em>
			<i class="right">
				  <dingding_users v-on:getdingdinguser="getCopyUsers" :approve_list="approve_list" :cc_list="cc_list" message="cc"></dingding_users>
			</i>
		</li>
		<li>
			<em class="left"></em>
			<i class="right">
				  <span v-if="subFlag"></span>
				 <button class="submit-foot" @click="submitFn">提交</button>
			</i>
		</li>
	</ul>
		
</div>

